package com.webchat.common.enums.mall;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MallReviewStatusEnum {

    PENDING(1, "待审核"),
    APPROVED(2, "通过"),
    REJECTED(3, "拒绝");

    private Integer status;
    private String statusName;


    public static MallReviewStatusEnum getByStatus(Integer status) {

        if (status == null) {
            return null;
        }
        for (MallReviewStatusEnum mallReviewStatusEnum : MallReviewStatusEnum.values()) {
            if (mallReviewStatusEnum.getStatus().equals(status)) {
                return mallReviewStatusEnum;
            }
        }
        return null;
    }
}
